package com.mandao.oneplat.boot.dao;

import org.bson.types.ObjectId;

import java.util.Date;

/**
 * Created by sunson on 2017/3/30.
 */
public abstract class AOneBaseEntity {

    public final static String FIELD_ID = "_id";
    public final static String FIELD_CREATE_TIME = "create_time";
    public final static String FIELD_UPDATE_TIME = "update_time";

    @AOneMongoId
    @AOneMongoField(FIELD_ID)
    protected ObjectId id;

    @AOneMongoField(FIELD_CREATE_TIME)
    protected Date createTime;

    @AOneMongoField(FIELD_UPDATE_TIME)
    protected Date updateTime;

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
